package com.runen.infinitemovement.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.runen.infinitemovement.R;
import com.runen.infinitemovement.model.entity.MeUtilsEntity;

/**
 * Create by LiaoDuanHong
 * Create on
 */
public class MeUtilsAdapter extends BaseQuickAdapter<MeUtilsEntity, BaseViewHolder> {
    private Context context;

    public MeUtilsAdapter(Context context) {
        super(R.layout.item_me_utils);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, MeUtilsEntity meUtilsEntity) {
        ImageView icon = baseViewHolder.findView(R.id.icon);
        TextView name = baseViewHolder.findView(R.id.tv_name);
        icon.setImageResource(meUtilsEntity.resourceId);
        name.setText(meUtilsEntity.name);
    }
}
